home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / medmfc.zip / MAGMAED.H < prev    next >
Text File  |  1994-08-12  |  6KB  |  205 lines

  1. /*===========================================================================*/
  2. /*                                                                           */
  3. /* File    : MAGMAED.H                                                       */
  4. /*                                                                           */
  5. /* Purpose : Public header file for the Magma Editor                         */
  6. /*                                                                           */
  7. /* History :                                                                 */
  8. /*                                                                           */
  9. /* (C) Copyright 1993-1994 Marc Adler/Magma Systems     All Rights Reserved  */
  10. /*===========================================================================*/
  11.  
  12. /*
  13.   Typedefs for the macro interpreter
  14. */
  15. typedef VOID FAR *HPROGRAM;
  16.  
  17.  
  18. /*
  19.   Window styles for the editor
  20. */
  21.  
  22. /*
  23.   ES_WANTTAB
  24.     This is used when an edit control is part of a dialog box. The editor
  25.     examines this style when it processes the WM_GETDLGCODE message in
  26.     order to let the Windows dialog manager know whether it want to keep
  27.     the tabs.
  28. */
  29. #define ES_WANTTAB        0x00008000L
  30.  
  31. /*
  32.   ES_OWNERDRAW
  33.     Used to allow the application to render a line of the edit control
  34. */
  35. #define ES_OWNERDRAW      0x00004000L
  36.  
  37. /*
  38.   ES_USEFORMATTING
  39. */
  40. #define ES_USEFORMATTING  0x00002000L
  41.  
  42.  
  43. /*
  44.   Editor messages
  45. */
  46. #define WM_BASE   (WM_USER + 1313)
  47.  
  48. #define ME_SELFINSERT      WM_BASE+0
  49. #define ME_FSEARCH         WM_BASE+1
  50. #define ME_BSEARCH         WM_BASE+2
  51. #define ME_FREPLACE        WM_BASE+3
  52. #define ME_BREPLACE        WM_BASE+4
  53. #  define SEARCH_CASE_INSENSITIVE    0x0001
  54. #  define SEARCH_NO_REGEXP           0x0002
  55. #  define SEARCH_SELECTMATCH         0x0004
  56. #  define SEARCH_WHOLE_WORD_ONLY     0x0008
  57. #  define SEARCH_PROMPT_ON_REPLACE   0x0100
  58. #  define SEARCH_BACKWARD            0x1000
  59.  
  60.  
  61. #define ME_DELLINE         WM_BASE+5
  62. #define ME_APPENDLINE      WM_BASE+6
  63. #define ME_INSERTLINE      WM_BASE+7
  64. #define ME_CUT             WM_BASE+8
  65. #define ME_CUTAPPEND       WM_BASE+9
  66. #define ME_RESETMARK       WM_BASE+10
  67. #define ME_COPY            WM_BASE+11
  68. #define ME_DUPLINE         WM_BASE+12
  69. #define ME_PASTE           WM_BASE+13
  70. #define ME_BACKSPACE       WM_BASE+14
  71. #define ME_DELWORD         WM_BASE+15
  72. #define ME_DELCHAR         WM_BASE+16
  73. #define ME_DELEOL          WM_BASE+17
  74. #define ME_TOGGLEINSERT    WM_BASE+18
  75. # define INSERTMODE_TOGGLE  0
  76. # define INSERTMODE_ON      1
  77. # define INSERTMODE_OFF     2
  78. #define ME_TAB             WM_BASE+19
  79. #define ME_BACKTAB         WM_BASE+20
  80. #define ME_UNDO            WM_BASE+21
  81. #define ME_REDO            WM_BASE+22
  82. #define ME_SEARCHAGAIN     WM_BASE+23
  83. #define ME_REPLACEAGAIN    WM_BASE+24
  84.  
  85. #define ME_MOVEUP          WM_BASE+30
  86. #define ME_MOVEDOWN        WM_BASE+31
  87. #define ME_MOVELEFT        WM_BASE+32
  88. #define ME_MOVERIGHT       WM_BASE+33
  89. #define ME_MOVEBOL         WM_BASE+34
  90. #define ME_MOVEEOL         WM_BASE+35
  91. #define ME_MOVENEXTWORD    WM_BASE+36
  92. #define ME_MOVEPREVWORD    WM_BASE+37
  93. #define ME_MOVENEXTPARA    WM_BASE+38
  94. #define ME_MOVEPREVPARA    WM_BASE+39
  95. #define ME_MOVETOPOFWINDOW WM_BASE+40
  96. #define ME_MOVEBOTOFWINDOW WM_BASE+41
  97. #define ME_MOVENEXTPAGE    WM_BASE+42
  98. #define ME_MOVEPREVPAGE    WM_BASE+43
  99. #define ME_MOVETOPOFBUFFER WM_BASE+44
  100. #define ME_MOVEBOTOFBUFFER WM_BASE+45
  101. #define ME_MOVETOBOOKMARK  WM_BASE+46
  102. #define ME_SETBOOKMARK     WM_BASE+47
  103. #define ME_GOTOLINE        WM_BASE+48
  104. #  define GOTOLINE_ABS   1
  105. #  define GOTOLINE_LAST  2
  106. #  define GOTOLINE_NEXT  3
  107. #  define GOTOLINE_PREV  4
  108. #define ME_REMOVEBOOKMARK  WM_BASE+49
  109. #  define BOOKMARK_REMOVEALL  ((WPARAM) -1)
  110.  
  111. #define ME_MATCHBRACE      WM_BASE+50
  112. #define ME_MARKLINE        WM_BASE+51
  113. #define ME_MARKLINERANGE   WM_BASE+52
  114. #define ME_INSERTCHAR      WM_BASE+53
  115. #define ME_UNDOLINES       WM_BASE+54
  116. #define ME_STREAMMARK      WM_BASE+55
  117. #define ME_RECTMARK        WM_BASE+56
  118. #define ME_CASELOWER       WM_BASE+57
  119. #define ME_CASEUPPER       WM_BASE+58
  120.  
  121. #define ME_OPENFILE        WM_BASE+60
  122. #define ME_WRITEFILE       WM_BASE+61
  123. /*
  124.   Return codes for EM_WRITEFILE
  125. */
  126. #  define EN_ERRCREATING  (-1)
  127. #  define EN_ERRWRITING   (-2)
  128.  
  129. /*
  130.   Options and settings
  131. */
  132. #define ME_SETBKCOLOR      WM_BASE+70
  133. #define ME_SETTEXTCOLOR    WM_BASE+71
  134. #define ME_SETOPTION       WM_BASE+72
  135. #define ME_QUERYOPTION     WM_BASE+73
  136. #define ME_OPTIONDLG       WM_BASE+74
  137. #define ME_SETFONT         WM_BASE+75
  138. #define ME_TOGGLEWORDWRAP  WM_BASE+76
  139. # define WORDWRAP_OFF     0
  140. # define WORDWRAP_ON      1
  141. # define WORDWRAP_TOGGLE  2
  142.  
  143. #define ME_HELPONWORD      WM_BASE+80
  144. #define ME_GETCURRWORD     WM_BASE+81
  145.  
  146. #define ME_KEYMACDEFINE    WM_BASE+90
  147. #define ME_KEYMACPLAY      WM_BASE+91
  148. #define ME_KEYMACPAUSE     WM_BASE+92
  149. #define ME_PROGFROMKEYMAC  WM_BASE+93
  150.  
  151. /*
  152.   Misc
  153. */
  154. #define ME_QUERYSEARCHSTRING   WM_BASE+100
  155. #define ME_QUERYSTATUS         WM_BASE+101
  156. #define ME_INSERTSTRING        WM_BASE+102
  157. # define ME_INSERT_MODE      0
  158. # define ME_OVERSTRIKE_MODE  1
  159.  
  160. #define WM_BASE_LAST_MSG       WM_BASE+200
  161.  
  162.  
  163. /*
  164.   Notification messages
  165. */
  166. #define MEN_UPDATE             WM_BASE+200
  167.  
  168. /*
  169.   Test bed for messages
  170. */
  171. #define WM_MSGTESTBASE         WM_BASE+900
  172.  
  173.  
  174. /*
  175.   The following messages are compatible with the Chicago RTF edit control
  176. */
  177. #define  EM_CHARFROMPOS        (WM_USER + 1213)
  178. #define  EM_EXGETSEL           (WM_USER + 1214)
  179. #define  EM_EXLINEFROMCHAR     (WM_USER + 1215)
  180. #define  EM_EXSETSEL           (WM_USER + 1216)
  181. #define  EM_GETSELTEXT         (WM_USER + 1217)
  182. #define  EM_GETTEXTRANGE       (WM_USER + 1218)
  183. #define  EM_POSFROMCHAR        (WM_USER + 1219)
  184. #define  EM_SELECTIONTYPE      (WM_USER + 1220)
  185. #define  EM_SETBKGNDCOLOR      (WM_USER + 1221)
  186.  
  187. typedef struct tagCharRange
  188. {
  189.   DWORD dwStart;
  190.   DWORD dwEnd;
  191. } CHARRANGE, *PCHARRANGE, FAR *LPCHARRANGE;
  192.  
  193.  
  194. #ifndef RC_INVOKED
  195. typedef struct tagMeStatus
  196. {
  197.   BOOL bInsert;
  198.   UINT column;
  199.   LONG row;
  200.   LONG currLineNum;
  201.   LONG nTotalLines;
  202. } MAGMAED_STATUS, FAR *LPMAGMAED_STATUS;
  203. #endif
  204.  
  205.